/**
 * Created by JustinChow on 2016/11/8.
 */

const Vector = require("./Vector");

Math.RadianToXY = function (radian) {
    return new Vector(Math.cos(radian), Math.sin(radian));
};

Math.XYToRadian = function (x, y) {
    return Math.atan2(y, x);
};

Math.RadianToDegree = function (radian) {
    return Math.floor(radian * 180 / Math.PI);
};